<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Đặng Khánh Trung
 * Date: 10/29/12
 * Time: 8:43 PM
 * To change this template use File | Settings | File Templates.
 */
defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('behavior.mootools');

JLoader::register('MucChon', JPATH_COMPONENT . '/helpers/mucchon.php');

$document = JFactory::getDocument();
$document->addStyleSheet(JURI::base() . 'components/com_vast/assets/css/admin_ui.css');
$document->addStyleSheet(JURI::base() . 'components/com_vast/assets/css/admin_menu.css');
$document->addStyleSheet(JURI::base() . 'components/com_vast/assets/css/admin.styles.css');
$document->addStyleSheet(JURI::base() . 'components/com_vast/assets/css/toolbar_images.css');
$document->addStyleSheet(JURI::base() . 'components/com_vast/assets/css/menu_images.css');

$document->addStyleSheet(JURI::root() . 'components/com_vast/assets/css/chosen.css');
$document->addStyleSheet(JURI::root() . 'components/com_vast/assets/css/vtip.css');
$document->addStyleSheet(JURI::root() . 'components/com_vast/assets/js/fancybox/jquery.fancybox-1.3.4.css');

$document->addScript(JURI::root() . 'components/com_vast/assets/js/jquery.min.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/jquery-ui.min.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/jquery.ui.autocomplete.html.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/jquery.noConflict.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/vmsite.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/fancybox/jquery.mousewheel-3.0.4.pack.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/fancybox/jquery.easing-1.3.pack.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/fancybox/jquery.fancybox-1.3.4.pack.js');
$document->addScript(JURI::base() . 'components/com_vast/assets/js/jquery.coookie.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/chosen.jquery.min.js');
$document->addScript(JURI::base() . 'components/com_vast/assets/js/vm2admin.js');

$document->addScriptDeclaration('
		var tip_image=\'/joomla/components/com_virtuemart/assets/js/images/vtip_arrow.png\';
		var vm2string ={ editImage: \'edit image\',select_all_text: \'select all options\',select_some_options_text :\'Select some Options\', select_an_option_text:\'Select an Option\'} ;
		 jQuery( function($) {

			$(\'dl#system-message\').hide().slideDown(400);
			$(\'.virtuemart-admin-area .toggler\').vm2admin(\'toggle\');
			$(\'#admin-ui-menu\').vm2admin(\'accordeon\');
			if ( $(\'#admin-ui-tabs\').length  ) {
				$(\'#admin-ui-tabs\').vm2admin(\'tabs\',virtuemartcookie).find(\'select\').chosen({enable_select_all: true,select_all_text : vm2string.select_all_text,select_some_options_text:vm2string.select_some_options_text});
			}

			$(\'#content-box [title]\').vm2admin(\'tips\',tip_image);
			$(\'.modal\').fancybox();
			$(\'.reset-value\').click( function(e){
                e.preventDefault();
                none = \'\';
                jQuery(this).parent().find(\'.ui-autocomplete-input\').val(none);

            });

		});

		var virtuemartcookie="virtuemart";

');

$statistics = $this->get('statistics');

?>
<div class="virtuemart-admin-area">
    <?php 
        $mucchon = new MucChon();
        echo $mucchon->layMucChon();
    ?>

<div id="admin-content-wrapper">
    <div class="toggler vmicon-show"></div>
    <div id="admin-content" class="admin-content">

        <div id="admin-ui-tabs">
            <div class="tabs" title="Bảng điều khiển">

                <div id="cpanel">

                    <div class="icon"><a title="Quản lý khối"
                                         href="index.php?option=com_vast&amp;view=khois"><span
                        class="vmicon48 vm_shop_products_48"></span><br/>Quản lý khối</a></div>
                    <div class="icon"><a title="Đơn vị trong viện"
                                         href="index.php?option=com_vast&amp;view=donvis"><span
                        class="vmicon48 vm_shop_categories_48"></span><br/>Quản lý đơn vị</a></div>
                    <div class="icon"><a title="Phòng ban trong viện"
                                         href="index.php?option=com_vast&amp;view=phongs"><span
                        class="vmicon48 vm_shop_orders_48"></span><br/>Phòng ban</a></div>
                    <div class="icon"><a title="Cán bộ viện"
                                         href="index.php?option=com_vast&amp;view=hosocanbos"><span
                        class="vmicon48 vm_shop_payment_48"></span><br/>Danh sách cán bộ</a></div>
                    <div class="icon"><a title="Phân quyền hệ thống"
                                         href="index.php?option=com_virtuemart&amp;view=user"><span
                        class="vmicon48 vm_shop_users_48"></span><br/>Phân quyền</a></div>
                    <div class="icon"><a title="Cấu hình hệ thống"
                                         href="index.php?option=com_virtuemart&amp;view=config"><span
                        class="vmicon48 vm_shop_configuration_48"></span><br/>Cấu hình hệ thống</a></div>
                    <div class="icon"><a title="Thông tin viện khoa học và công nghệ"
                                         href="index.php?option=com_vast&amp;view=viens"><span
                        class="vmicon48 vm_shop_mart_48"></span><br/>Viện Khoa học và công nghệ Việt Nam</a></div>
                    <div class="clear"></div>
                </div>
                <div class="clear"></div>
            </div>
            <div class="tabs" title="Thống kê">
                <table class="adminlist" cellspacing="0" cellpadding="0">
                    <tr>
                        <th colspan="2" class="title">Thống kê</th>
                    </tr>
                    <tr>
                        <td width="50%">
                            <a href="index.php?option=com_vast&amp;view=khois">
                                Khối trong viện </a>
                        </td>
                        <td width="50%"><?php echo $statistics['numOfKhois']; ?></td>
                    </tr>
                    <tr>
                        <td width="50%">
                            <a href="index.php?option=com_vast&amp;view=donvis">
                                Các đơn vị trong viện </a>
                        </td>
                        <td width="50%"><?php echo $statistics['numOfDonvis']; ?></td>
                    </tr>
                    <tr>
                        <td width="50%">
                            <a href="index.php?option=com_vast&amp;view=phongs">
                                Các phòng trong viện </a>
                        </td>
                        <td width="50%"><?php echo $statistics['numOfPhongs']; ?></td>
                    </tr>
                    <tr>
                        <td width="50%">
                            <a href="index.php?option=com_vast&amp;view=hosocanbos">
                                Số cán bộ nhân viên trong viện </a>
                        </td>
                        <td width="50%"><?php echo $statistics['numOfHosocanbos']; ?></td>
                    </tr>
                    <tr>
                        <td width="50%">
                            <a href="index.php?option=com_vast&amp;view=congtrinhs">
                                Số công trình nghiên cứu trong viện </a>
                        </td>
                        <td width="50%"><?php echo $statistics['numOfCongtrinhs']; ?></td>
                    </tr>
                </table>
                <div class="clear"></div>
            </div>
        </div>
        <div class="clear"></div>
    </div>
